package edu.purdue.cs.aggr.message;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

import edu.purdue.cs.aggr.Accumulator;


public class AccumulatorMessage extends Message {

	@SuppressWarnings("rawtypes")
	private Accumulator accumulator = null;
	
	@SuppressWarnings("rawtypes")
	@Override
	public void readExternal(ObjectInput in) throws IOException,
			ClassNotFoundException {
		super.readExternal(in);
		accumulator = (Accumulator) in.readObject();
	}

	@Override
	public void writeExternal(ObjectOutput out) throws IOException {
		super.writeExternal(out);
		out.writeObject(accumulator);
	}

	@SuppressWarnings("rawtypes")
	public Accumulator getAccumulator() {
		return accumulator;
	}

	@SuppressWarnings("rawtypes")
	public void setAccumulator(Accumulator accumulator) {
		this.accumulator = accumulator;
	}

}
